clc,clear,close all;
N=[4 4; 8 4; 15 8;24 4; 24 12];
% N = [0 0; .5 0;0 2; 2 2;2.5 8; 6 3; 7 3];
% N=[ 1 1; 1.5 1.5;5 5; 3 4;4 4 ; 3 3.5]
D = pdist(N);
% tree  = linkage(D,'single');
% tree  = linkage(D,'complete');
tree  = linkage(D,'weighted');
disp(tree);
dendrogram(tree);
title('.....Hierarchical Clustering using single Linkage Algorithm.....')
xlabel('object number in original x')
ylabel('distance')